import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
// main.js
import uView from '@/uni_modules/uview-ui'
import request from 'common/request.js'
import Tabbar from '@/components/tabbar.vue'
import store from './store/global.js'
import '@/utils/permission.js'
import share from '@/utils/share.js'
Vue.use(uView)
Vue.mixin(share)
Vue.component('Tabbar', Tabbar)

Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.$request = request.request
Vue.prototype.$nav = request.nav
Vue.prototype.$handleLogin = request.handleLogin
Vue.prototype.$store = store

const app = new Vue({
	store,
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif